<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>Class hQuery</title>

	<link rel="stylesheet" href="resources/bootstrap.min.css?973e37a8502921d56bc02bb55321f45b072b6f71">
	<link rel="stylesheet" href="resources/style.css?70c1d062672daa3f906b72e4f5d03d4bc5c4174d">

</head>

<body>
	<nav id="navigation" class="navbar navbar-default navbar-fixed-top">
		<div class="container-fluid">
			<div class="navbar-header">
				<a href="index.html" class="navbar-brand">Overview</a>
			</div>
			<div class="collapse navbar-collapse">

                <form id="search" class="navbar-form navbar-left" role="search">
                    <input type="hidden" name="cx" value="">
                    <input type="hidden" name="ie" value="UTF-8">
                    <div class="form-group">
                        <input type="text" name="q" class="search-query form-control" placeholder="Search">
					</div>
				</form>

				<ul class="nav navbar-nav">
					<li class="active">
<span>Class</span>					</li>





				</ul>
			</div>
		</div>
	</nav>

	<div id="left">
	<div id="menu">

		<div id="groups">
		</div>


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li class="active"><a href="class-hQuery.html">hQuery</a></li>
				<li><a href="class-hQuery_Element.html">hQuery_Element</a></li>
				<li><a href="class-hQuery_HTML_Parser.html">hQuery_HTML_Parser</a></li>
				<li><a href="class-hQuery_Node.html">hQuery_Node</a></li>
			</ul>





		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
	<div id="rightInner">
<div id="content" class="class">
	<h1>Class hQuery</h1>


	<div class="description">
	<p>Main Class, represents an HTML document.</p>
	</div>

	<dl class="tree well">
		<dd style="padding-left:0px">
			<a href="class-hQuery_Node.html"><span>hQuery_Node</span></a>
			
			 implements 
<span>Iterator</span>, 
			
<span>Countable</span>
			
			
		</dd>
		<dd style="padding-left:30px">
			<img src="resources/inherit.png" alt="Extended by">
			<a href="class-hQuery_HTML_Parser.html"><span>hQuery_HTML_Parser</span></a>
			
			
			
		</dd>
		<dd style="padding-left:60px">
			<img src="resources/inherit.png" alt="Extended by">
<b><span>hQuery</span></b>			
			
			
		</dd>
	</dl>








	<div class="alert alert-info">
		
		
		
		

				<b>License:</b>
				<a href="MIT">MIT</a><br>
				<b>Author:</b>
				Dumitru Uzun (DUzun.ME)<br>
			<b>Located at</b> <a href="source-class-hQuery.html#1801-2942" title="Go to source code"></a>
		<br>
	</div>



		<div class="panel panel-default">
			<div class="panel-heading"><h2>Methods summary</h2></div>
			<table class="summary table table-bordered table-striped methods" id="methods">
		<tr data-order="fromHTML" id="_fromHTML">

			<td class="attributes"><code>
				 public static
				<code><a href="class-hQuery.html">hQuery</a></code>
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_fromHTML">#</a>
			<code><a href="source-class-hQuery.html#1816-1839" title="Go to source code">fromHTML</a>( <span>string <var>$html</var></span>, <span>string <var>$url</var> = <span class="php-keyword1">NULL</span></span> )</code>

			<div class="description short">
				<p>Parse and HTML string.</p>
			</div>

			<div class="description detailed hidden">
				<p>Parse and HTML string.</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$html</var></dt>
						<dd><ul>
<li>source of some HTML document</li>
</ul></dd>
						<dt><var>$url</var></dt>
						<dd><ul>
<li>OPTIONAL location of the document. Used for relative URLs inside the document.</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						<code><a href="class-hQuery.html">hQuery</a></code><br>$doc
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="fromFile" id="_fromFile">

			<td class="attributes"><code>
				 public static
				<code><a href="class-hQuery.html">hQuery</a></code>
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_fromFile">#</a>
			<code><a href="source-class-hQuery.html#1841-1859" title="Go to source code">fromFile</a>( <span>string <var>$filename</var></span>, <span>boolean <var>$use_include_path</var> = <span class="php-keyword1">false</span></span>, <span>resource <var>$context</var> = <span class="php-keyword1">NULL</span></span> )</code>

			<div class="description short">
				<p>Read the HTML document from a file.</p>
			</div>

			<div class="description detailed hidden">
				<p>Read the HTML document from a file.</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$filename</var></dt>
						<dd><ul>
<li>a valid filename</li>
</ul></dd>
						<dt><var>$use_include_path</var></dt>
						<dd><ul>
<li>OPTIONAL passed to file_get_contents()</li>
</ul></dd>
						<dt><var>$context</var></dt>
						<dd><ul>
<li>OPTIONAL A valid context resource created with stream_context_create().</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						<code><a href="class-hQuery.html">hQuery</a></code><br>$doc
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="fromURL" id="_fromURL">

			<td class="attributes"><code>
				 public static
				<code><a href="class-hQuery.html">hQuery</a></code>
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_fromURL">#</a>
			<code><a href="source-class-hQuery.html#1861-1953" title="Go to source code">fromURL</a>( <span>string <var>$url</var></span>, <span>array <var>$headers</var> = <span class="php-keyword1">NULL</span></span>, <span>array|string <var>$body</var> = <span class="php-keyword1">NULL</span></span>, <span>array <var>$options</var> = <span class="php-keyword1">NULL</span></span> )</code>

			<div class="description short">
				<p>Fetch the HTML document from remote $url.</p>
			</div>

			<div class="description detailed hidden">
				<p>Fetch the HTML document from remote $url.</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$url</var></dt>
						<dd><ul>
<li>the URL of the document</li>
</ul></dd>
						<dt><var>$headers</var></dt>
						<dd><ul>
<li>OPTIONAL request headers</li>
</ul></dd>
						<dt><var>$body</var></dt>
						<dd><ul>
<li>OPTIONAL body of the request (for POST or PUT)</li>
</ul></dd>
						<dt><var>$options</var></dt>
						<dd><ul>
<li>OPTIONAL request options (see self::http_wr() for more details)</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						<code><a href="class-hQuery.html">hQuery</a></code><br>$doc
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="find" id="_find">

			<td class="attributes"><code>
				 public 
				<code><a href="class-hQuery_Element.html">hQuery_Element</a></code>
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_find">#</a>
			<code><a href="source-class-hQuery.html#1956-2042" title="Go to source code">find</a>( <span>string <var>$sel</var></span>, <span>array|string <var>$attr</var> = <span class="php-keyword1">NULL</span></span>, <span><code><a href="class-hQuery_Node.html">hQuery_Node</a></code> <var>$ctx</var> = <span class="php-keyword1">NULL</span></span> )</code>

			<div class="description short">
				<p>Finds a collection of nodes inside current document/context (similar to jQuery.fn.find()).</p>
			</div>

			<div class="description detailed hidden">
				<p>Finds a collection of nodes inside current document/context (similar to jQuery.fn.find()).</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$sel</var></dt>
						<dd><ul>
<li>A valid CSS selector.</li>
</ul></dd>
						<dt><var>$attr</var></dt>
						<dd><ul>
<li>OPTIONAL attributes as string or key-value pairs.</li>
</ul></dd>
						<dt><var>$ctx</var></dt>
						<dd><ul>
<li>OPTIONAL the context where to search. If omitted, $this is used.</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						<code><a href="class-hQuery_Element.html">hQuery_Element</a></code><br>collection of matched elements
					</div>



					<h4>Overrides</h4>
					<div class="list"><code><a href="class-hQuery_Node.html#_find">hQuery_Node::find</a></code></div>

			</div>
			</div></td>
		</tr>
		<tr data-order="find_html" id="_find_html">

			<td class="attributes"><code>
				 public 
				array
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_find_html">#</a>
			<code><a href="source-class-hQuery.html#2044-2058" title="Go to source code">find_html</a>( <span>string <var>$sel</var></span>, <span>array|string <var>$attr</var> = <span class="php-keyword1">NULL</span></span>, <span><code><a href="class-hQuery_Node.html">hQuery_Node</a></code> <var>$ctx</var> = <span class="php-keyword1">NULL</span></span> )</code>

			<div class="description short">
				<p>Combination of ->find() + ->html()</p>
			</div>

			<div class="description detailed hidden">
				<p>Combination of ->find() + ->html()</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$sel</var></dt>
						<dd><ul>
<li>A valid CSS selector.</li>
</ul></dd>
						<dt><var>$attr</var></dt>
						<dd><ul>
<li>OPTIONAL attributes as string or key-value pairs.</li>
</ul></dd>
						<dt><var>$ctx</var></dt>
						<dd><ul>
<li>OPTIONAL the context where to search. If omitted, $this is used.</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						array<br>list of HTML contents of all matched elements
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="find_text" id="_find_text">

			<td class="attributes"><code>
				 public 
				array
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_find_text">#</a>
			<code><a href="source-class-hQuery.html#2060-2074" title="Go to source code">find_text</a>( <span>string <var>$sel</var></span>, <span>array|string <var>$attr</var> = <span class="php-keyword1">NULL</span></span>, <span><code><a href="class-hQuery_Node.html">hQuery_Node</a></code> <var>$ctx</var> = <span class="php-keyword1">NULL</span></span> )</code>

			<div class="description short">
				<p>Combination of ->find() + ->text()</p>
			</div>

			<div class="description detailed hidden">
				<p>Combination of ->find() + ->text()</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$sel</var></dt>
						<dd><ul>
<li>A valid CSS selector.</li>
</ul></dd>
						<dt><var>$attr</var></dt>
						<dd><ul>
<li>OPTIONAL attributes as string or key-value pairs.</li>
</ul></dd>
						<dt><var>$ctx</var></dt>
						<dd><ul>
<li>OPTIONAL the context where to search. If omitted, $this is used.</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						array<br>list of Text contents of all matched elements
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="index" id="_index">

			<td class="attributes"><code>
				 public 
				
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_index">#</a>
			<code><a href="source-class-hQuery.html#2076-2079" title="Go to source code">index</a>( )</code>

			<div class="description short">
				<p>Index elements of the source HTML. (Called automatically)</p>
			</div>

			<div class="description detailed hidden">
				<p>Index elements of the source HTML. (Called automatically)</p>







			</div>
			</div></td>
		</tr>
		<tr data-order="jsonize" id="_jsonize">

			<td class="attributes"><code>
				 public static
				string
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_jsonize">#</a>
			<code><a href="source-class-hQuery.html#2084-2105" title="Go to source code">jsonize</a>( <span>mixed <var>$data</var></span>, <span>&amp;string <var>&amp; $type</var> = <span class="php-keyword1">NULL</span></span>, <span> <var>$ops</var> = <span class="php-num">0</span></span> )</code>

			<div class="description short">
				<p>Serialize $data as JSON, fallback to serialize.</p>
			</div>

			<div class="description detailed hidden">
				<p>Serialize $data as JSON, fallback to serialize.</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$data</var></dt>
						<dd><ul>
<li>the data to be serialized</li>
</ul></dd>
						<dt><var>$type</var></dt>
						<dd><ul>
<li>returns the serialization method used ('json' | 'ser')</li>
</ul></dd>
						<dt><var>$ops</var></dt>
						<dd></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						string<br>the serialized data
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="unjsonize" id="_unjsonize">

			<td class="attributes"><code>
				 public static
				mixed
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_unjsonize">#</a>
			<code><a href="source-class-hQuery.html#2107-2189" title="Go to source code">unjsonize</a>( <span>string <var>$str</var></span>, <span>&amp;string <var>&amp; $type</var> = <span class="php-keyword1">NULL</span></span> )</code>

			<div class="description short">
				<p>Unserialize $data from either JSON or serialize.</p>
			</div>

			<div class="description detailed hidden">
				<p>Unserialize $data from either JSON or serialize.</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$str</var></dt>
						<dd><ul>
<li>the data to be unserialized</li>
</ul></dd>
						<dt><var>$type</var></dt>
						<dd><ul>
<li>if not set, returns the serialization method detected ('json' | 'ser');
                     if set, forces unjsonize() to use this method for unserialization.</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						mixed<br>the unserialized data
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="serjstype" id="_serjstype">

			<td class="attributes"><code>
				 protected static
				string
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_serjstype">#</a>
			<code><a href="source-class-hQuery.html#2191-2213" title="Go to source code">serjstype</a>( <span>string <var>$str</var></span> )</code>

			<div class="description short">
				<p>Tries to detect format of $str (json or ser).</p>
			</div>

			<div class="description detailed hidden">
				<p>Tries to detect format of $str (json or ser).</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$str</var></dt>
						<dd><ul>
<li>JSON encoded or PHP serialized data.</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						string<br>'json' | 'ser', or FALSE on failure to detect format.
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="gzdecode" id="_gzdecode">

			<td class="attributes"><code>
				 public static
				
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_gzdecode">#</a>
			<code><a href="source-class-hQuery.html#2215-2222" title="Go to source code">gzdecode</a>( <span> <var>$str</var></span> )</code>

			<div class="description short">
				<p>gzdecode() (for PHP &lt; 5.4.0)</p>
			</div>

			<div class="description detailed hidden">
				<p>gzdecode() (for PHP &lt; 5.4.0)</p>







			</div>
			</div></td>
		</tr>
		<tr data-order="_gzdecode" id="__gzdecode">

			<td class="attributes"><code>
				 protected static
				
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#__gzdecode">#</a>
			<code><a href="source-class-hQuery.html#2224-2345" title="Go to source code">_gzdecode</a>( <span> <var>$data</var></span> )</code>

			<div class="description short">
				<p>Alternative gzdecode() (for PHP &lt; 5.4.0)
source: http://nl1.php.net/manual/en/function.gzdecode.php#82879</p>
			</div>

			<div class="description detailed hidden">
				<p>Alternative gzdecode() (for PHP &lt; 5.4.0)
source: http://nl1.php.net/manual/en/function.gzdecode.php#82879</p>







			</div>
			</div></td>
		</tr>
		<tr data-order="get_cache" id="_get_cache">

			<td class="attributes"><code>
				 protected static
				array
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_get_cache">#</a>
			<code><a href="source-class-hQuery.html#2347-2390" title="Go to source code">get_cache</a>( <span>string <var>$fn</var></span>, <span>integer <var>$expire</var> = <span class="php-keyword1">false</span></span>, <span>boolean <var>$meta_only</var> = <span class="php-keyword1">false</span></span> )</code>

			<div class="description short">
				<p>Read data from a cache file.</p>
			</div>

			<div class="description detailed hidden">
				<p>Read data from a cache file.</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$fn</var></dt>
						<dd><ul>
<li>cache filename</li>
</ul></dd>
						<dt><var>$expire</var></dt>
						<dd><ul>
<li>OPTIONAL contents returned only if it is newer then $expire seconds</li>
</ul></dd>
						<dt><var>$meta_only</var></dt>
						<dd><ul>
<li>OPTIONAL if TRUE, read only meta-info (faster)</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						array<br>[mixed <contents>, array <meta_info>]
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="set_cache" id="_set_cache">

			<td class="attributes"><code>
				 protected static
				integer|boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_set_cache">#</a>
			<code><a href="source-class-hQuery.html#2392-2421" title="Go to source code">set_cache</a>( <span>string <var>$fn</var></span>, <span>mixed <var>$cnt</var></span>, <span>array <var>$meta</var> = <span class="php-keyword1">NULL</span></span>, <span>boolean <var>$gzip</var> = <span class="php-keyword1">true</span></span> )</code>

			<div class="description short">
				<p>Save data to a cache file.</p>
			</div>

			<div class="description detailed hidden">
				<p>Save data to a cache file.</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$fn</var></dt>
						<dd><ul>
<li>cache filename</li>
</ul></dd>
						<dt><var>$cnt</var></dt>
						<dd><ul>
<li>contents to be cached</li>
</ul></dd>
						<dt><var>$meta</var></dt>
						<dd><ul>
<li>OPTIONAL meta information related to contents.</li>
</ul></dd>
						<dt><var>$gzip</var></dt>
						<dd><ul>
<li>OPTIONAL if TRUE and gzip supported, store contents gzipped</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						integer|boolean<br>On success, number of written bytes, FALSE on fail.
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="do_flock" id="_do_flock">

			<td class="attributes"><code>
				 public static
				true
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_do_flock">#</a>
			<code><a href="source-class-hQuery.html#2423-2450" title="Go to source code">do_flock</a>( <span>resource <var>$fp</var></span>, <span>integer <var>$lock</var></span>, <span>integer <var>$timeout_ms</var> = <span class="php-num">384</span></span> )</code>

			<div class="description short">
				<p>Lock with retries</p>
			</div>

			<div class="description detailed hidden">
				<p>Lock with retries</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$fp</var></dt>
						<dd><ul>
<li>Open file pointer</li>
</ul></dd>
						<dt><var>$lock</var></dt>
						<dd><ul>
<li>Lock type</li>
</ul></dd>
						<dt><var>$timeout_ms</var></dt>
						<dd><ul>
<li>OPTIONAL Timeout to wait for unlock in miliseconds</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						true<br>on success, false on fail
					</div>


					<h4>Author</h4>
					<div class="list">
							Dumitru Uzun<br>
					</div>


			</div>
			</div></td>
		</tr>
		<tr data-order="flock_put_contents" id="_flock_put_contents">

			<td class="attributes"><code>
				 public static
				
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_flock_put_contents">#</a>
			<code><a href="source-class-hQuery.html#2452-2469" title="Go to source code">flock_put_contents</a>( <span> <var>$fn</var></span>, <span> <var>$cnt</var></span>, <span> <var>$block</var> = <span class="php-keyword1">false</span></span> )</code>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				







			</div>
			</div></td>
		</tr>
		<tr data-order="flock_get_contents" id="_flock_get_contents">

			<td class="attributes"><code>
				 public static
				
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_flock_get_contents">#</a>
			<code><a href="source-class-hQuery.html#2471-2485" title="Go to source code">flock_get_contents</a>( <span> <var>$fn</var></span>, <span> <var>$block</var> = <span class="php-keyword1">false</span></span> )</code>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				







			</div>
			</div></td>
		</tr>
		<tr data-order="is_url_path" id="_is_url_path">

			<td class="attributes"><code>
				 public static
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_is_url_path">#</a>
			<code><a href="source-class-hQuery.html#2487-2496" title="Go to source code">is_url_path</a>( <span>string <var>$path</var></span> )</code>

			<div class="description short">
				<p>Check whether $path is a valid url.</p>
			</div>

			<div class="description detailed hidden">
				<p>Check whether $path is a valid url.</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$path</var></dt>
						<dd><ul>
<li>a path to check</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean<br>TRUE if $path is a valid URL, FALSE otherwise
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="is_abs_path" id="_is_abs_path">

			<td class="attributes"><code>
				 public static
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_is_abs_path">#</a>
			<code><a href="source-class-hQuery.html#2498-2514" title="Go to source code">is_abs_path</a>( <span>string <var>$path</var></span> )</code>

			<div class="description short">
				<p>Check whether $path is an absolute path.</p>
			</div>

			<div class="description detailed hidden">
				<p>Check whether $path is an absolute path.</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$path</var></dt>
						<dd><ul>
<li>a path to check</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean<br>TRUE if $path is an absolute path, FALSE otherwise
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="abs_url" id="_abs_url">

			<td class="attributes"><code>
				 public static
				string
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_abs_url">#</a>
			<code><a href="source-class-hQuery.html#2516-2555" title="Go to source code">abs_url</a>( <span>string <var>$url</var></span>, <span>string <var>$base</var></span> )</code>

			<div class="description short">
				<p>Given a $url (relative or absolute) and a $base url, returns absolute url for $url.</p>
			</div>

			<div class="description detailed hidden">
				<p>Given a $url (relative or absolute) and a $base url, returns absolute url for $url.</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$url</var></dt>
						<dd><ul>
<li>relative or absolute URL</li>
</ul></dd>
						<dt><var>$base</var></dt>
						<dd><ul>
<li>Base URL for $url</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						string<br>absolute URL for $url
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="parse_cookie" id="_parse_cookie">

			<td class="attributes"><code>
				 public static
				
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_parse_cookie">#</a>
			<code><a href="source-class-hQuery.html#2558-2589" title="Go to source code">parse_cookie</a>( <span> <var>$str</var></span> )</code>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				







			</div>
			</div></td>
		</tr>
		<tr data-order="http_wr" id="_http_wr">

			<td class="attributes"><code>
				 public static
				array
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_http_wr">#</a>
			<code><a href="source-class-hQuery.html#2592-2938" title="Go to source code">http_wr</a>( <span>string <var>$host</var></span>, <span>array <var>$head</var> = <span class="php-keyword1">NULL</span></span>, <span>mixed <var>$body</var> = <span class="php-keyword1">NULL</span></span>, <span>array <var>$options</var> = <span class="php-keyword1">NULL</span></span> )</code>

			<div class="description short">
				<p>Executes a HTTP write-read session.</p>
			</div>

			<div class="description detailed hidden">
				<p>Executes a HTTP write-read session.</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$host</var></dt>
						<dd><ul>
<li>IP/HOST address or URL</li>
</ul></dd>
						<dt><var>$head</var></dt>
						<dd><ul>
<li>list off HTTP headers to be sent along with the request to $host</li>
</ul></dd>
						<dt><var>$body</var></dt>
						<dd><ul>
<li>data to be sent as the contents of the request. If is array or object, a http query is built.</li>
</ul></dd>
						<dt><var>$options</var></dt>
						<dd><ul>
<li>list of option as key-value:
                         timeout - connection timeout in seconds
                         host    - goes to headers, overrides $host (ex. $host == '127.0.0.1', $options['host'] == 'www.example.com')
                         port    - usefull when $host is not a full URL
                         scheme  - http, ssl, tls, udp, ...
                         close   - whether to close connection o not
                         redirects - number of allowed redirects
                         redirect_method - if (string), this is the new method for redirect request, else
                                           if true, preserve method, else use 'GET' on redirect.
                                           by default preserve on 307 and 308, GET on 301-303</li>
</ul></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						array<br>[contents, headers, http-status-code, http-status-message]
					</div>


					<h4>Author</h4>
					<div class="list">
							Dumitru Uzun<br>
					</div>


			</div>
			</div></td>
		</tr>
			</table>
		</div>

		<div class="panel panel-default">
	        <div class="panel-heading"><h3>Methods inherited from <a href="class-hQuery_HTML_Parser.html#methods">hQuery_HTML_Parser</a></h3></div>
			<p class="elementList">
				<code><a href="class-hQuery_HTML_Parser.html#___construct">__construct()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#___get">__get()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#___set">__set()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#___toString">__toString()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#__find">_find()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#__get_ctx">_get_ctx()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#__index_all">_index_all()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#__index_comments_html">_index_comments_html()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#__info">_info()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_baseURI">baseURI()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_detect_charset">detect_charset()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_filter">filter()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_get_aids_byAttr">get_aids_byAttr()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_get_aids_byClass">get_aids_byClass()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_get_aids_byClassAttr">get_aids_byClassAttr()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_get_attr_byAid">get_attr_byAid()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_get_attr_byId">get_attr_byId()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_get_ids_byAid">get_ids_byAid()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_get_ids_byAttr">get_ids_byAttr()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_get_ids_byClass">get_ids_byClass()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_get_ids_byClassAttr">get_ids_byClassAttr()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_get_url_base">get_url_base()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_get_url_path">get_url_path()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_hasClass">hasClass()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_location">location()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_strlen">strlen()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_substr">substr()</a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#_url2abs">url2abs()</a></code>
			</p>
		</div>
		<div class="panel panel-default">
	        <div class="panel-heading"><h3>Methods inherited from <a href="class-hQuery_Node.html#methods">hQuery_Node</a></h3></div>
			<p class="elementList">
				<code><a href="class-hQuery_Node.html#_CSSArr2Str">CSSArr2Str()</a></code>, 
				<code><a href="class-hQuery_Node.html#___destruct">__destruct()</a></code>, 
				<code><a href="class-hQuery_Node.html#___isset">__isset()</a></code>, 
				<code><a href="class-hQuery_Node.html#___unset">__unset()</a></code>, 
				<code><a href="class-hQuery_Node.html#__all">_all()</a></code>, 
				<code><a href="class-hQuery_Node.html#__children">_children()</a></code>, 
				<code><a href="class-hQuery_Node.html#__ctx_ids">_ctx_ids()</a></code>, 
				<code><a href="class-hQuery_Node.html#__doc_ids">_doc_ids()</a></code>, 
				<code><a href="class-hQuery_Node.html#__filter">_filter()</a></code>, 
				<code><a href="class-hQuery_Node.html#__has">_has()</a></code>, 
				<code><a href="class-hQuery_Node.html#__my_ids">_my_ids()</a></code>, 
				<code><a href="class-hQuery_Node.html#__next">_next()</a></code>, 
				<code><a href="class-hQuery_Node.html#__parent">_parent()</a></code>, 
				<code><a href="class-hQuery_Node.html#__prev">_prev()</a></code>, 
				<code><a href="class-hQuery_Node.html#__sub_ids">_sub_ids()</a></code>, 
				<code><a href="class-hQuery_Node.html#_array_select">array_select()</a></code>, 
				<code><a href="class-hQuery_Node.html#_attr">attr()</a></code>, 
				<code><a href="class-hQuery_Node.html#_convert_encoding">convert_encoding()</a></code>, 
				<code><a href="class-hQuery_Node.html#_count">count()</a></code>, 
				<code><a href="class-hQuery_Node.html#_current">current()</a></code>, 
				<code><a href="class-hQuery_Node.html#_doc">doc()</a></code>, 
				<code><a href="class-hQuery_Node.html#_exclude">exclude()</a></code>, 
				<code><a href="class-hQuery_Node.html#_html">html()</a></code>, 
				<code><a href="class-hQuery_Node.html#_html_attr2str">html_attr2str()</a></code>, 
				<code><a href="class-hQuery_Node.html#_html_findTagClose">html_findTagClose()</a></code>, 
				<code><a href="class-hQuery_Node.html#_html_parseAttrStr">html_parseAttrStr()</a></code>, 
				<code><a href="class-hQuery_Node.html#_isDoc">isDoc()</a></code>, 
				<code><a href="class-hQuery_Node.html#_isEmpty">isEmpty()</a></code>, 
				<code><a href="class-hQuery_Node.html#_is_empty">is_empty()</a></code>, 
				<code><a href="class-hQuery_Node.html#_key">key()</a></code>, 
				<code><a href="class-hQuery_Node.html#_next">next()</a></code>, 
				<code><a href="class-hQuery_Node.html#_nodeName">nodeName()</a></code>, 
				<code><a href="class-hQuery_Node.html#_outerHtml">outerHtml()</a></code>, 
				<code><a href="class-hQuery_Node.html#_parseCSStr">parseCSStr()</a></code>, 
				<code><a href="class-hQuery_Node.html#_pos">pos()</a></code>, 
				<code><a href="class-hQuery_Node.html#_prev">prev()</a></code>, 
				<code><a href="class-hQuery_Node.html#_rewind">rewind()</a></code>, 
				<code><a href="class-hQuery_Node.html#_str_range">str_range()</a></code>, 
				<code><a href="class-hQuery_Node.html#_text">text()</a></code>, 
				<code><a href="class-hQuery_Node.html#_valid">valid()</a></code>
			</p>
		</div>







		<div class="panel panel-default">
            <div class="panel-heading"><h2>Constants summary</h2></div>
		</div>

		<div class="panel panel-default">
            <div class="panel-heading"><h3>Constants inherited from <a href="class-hQuery_Node.html#constants">hQuery_Node</a></h3></div>
			<p class="elementList">
				<code><a href="class-hQuery_Node.html#VERSION"><b>VERSION</b></a></code>
			</p>
		</div>



		<div class="panel panel-default">
            <div class="panel-heading"><h2>Properties summary</h2></div>
			<table class="summary table table-bordered table-striped properties" id="properties">
		<tr data-order="headers" id="$headers">
			<td class="attributes"><code>
				public  
				
			</code></td>

			<td class="name">
					<a href="source-class-hQuery.html#1808" title="Go to source code"><var>$headers</var></a>

				<div class="description short">
					
				</div>

				<div class="description detailed hidden">
					

				</div>
			</td>
			<td class="value">
				<div>
					<a href="#$headers" class="anchor">#</a>
					<code></code>
				</div>
			</td>
		</tr>
		<tr data-order="cache_path" id="$cache_path">
			<td class="attributes"><code>
				public static 
				
			</code></td>

			<td class="name">
					<a href="source-class-hQuery.html#1810" title="Go to source code"><var>$cache_path</var></a>

				<div class="description short">
					
				</div>

				<div class="description detailed hidden">
					

				</div>
			</td>
			<td class="value">
				<div>
					<a href="#$cache_path" class="anchor">#</a>
					<code></code>
				</div>
			</td>
		</tr>
		<tr data-order="cache_expires" id="$cache_expires">
			<td class="attributes"><code>
				public static 
				integer
			</code></td>

			<td class="name">
					<a href="source-class-hQuery.html#1811" title="Go to source code"><var>$cache_expires</var></a>

				<div class="description short">
					
				</div>

				<div class="description detailed hidden">
					

				</div>
			</td>
			<td class="value">
				<div>
					<a href="#$cache_expires" class="anchor">#</a>
					<code><span class="php-num">3600</span></code>
				</div>
			</td>
		</tr>
		<tr data-order="_mockup_class" id="$_mockup_class">
			<td class="attributes"><code>
				public static 
				
			</code></td>

			<td class="name">
					<a href="source-class-hQuery.html#1814" title="Go to source code"><var>$_mockup_class</var></a>

				<div class="description short">
					
				</div>

				<div class="description detailed hidden">
					

				</div>
			</td>
			<td class="value">
				<div>
					<a href="#$_mockup_class" class="anchor">#</a>
					<code></code>
				</div>
			</td>
		</tr>
			</table>
		</div>

		<div class="panel panel-default">
            <div class="panel-heading"><h3>Properties inherited from <a href="class-hQuery_HTML_Parser.html#properties">hQuery_HTML_Parser</a></h3></div>
			<p class="elementList">
				<code><a href="class-hQuery_HTML_Parser.html#$_emptyTags"><var>$_emptyTags</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$_icharset"><var>$_icharset</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$_index_attribs"><var>$_index_attribs</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$_specialTags"><var>$_specialTags</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$_tagID_first_letter"><var>$_tagID_first_letter</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$_tagID_letters"><var>$_tagID_letters</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$_unparsedTags"><var>$_unparsedTags</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$_url_attribs"><var>$_url_attribs</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$attr_idx"><var>$attr_idx</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$attribs"><var>$attribs</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$attrs"><var>$attrs</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$autoclose_tags"><var>$autoclose_tags</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$case_folding"><var>$case_folding</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$class_idx"><var>$class_idx</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$del_spaces"><var>$del_spaces</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$html"><var>$html</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$idx_attr"><var>$idx_attr</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$indexed"><var>$indexed</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$o"><var>$o</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$tag_idx"><var>$tag_idx</var></a></code>, 
				<code><a href="class-hQuery_HTML_Parser.html#$tags"><var>$tags</var></a></code>
			</p>
		</div>
		<div class="panel panel-default">
            <div class="panel-heading"><h3>Properties inherited from <a href="class-hQuery_Node.html#properties">hQuery_Node</a></h3></div>
			<p class="elementList">
				<code><a href="class-hQuery_Node.html#$_ar_"><var>$_ar_</var></a></code>, 
				<code><a href="class-hQuery_Node.html#$_fl_"><var>$_fl_</var></a></code>, 
				<code><a href="class-hQuery_Node.html#$_mi_"><var>$_mi_</var></a></code>, 
				<code><a href="class-hQuery_Node.html#$_nl_"><var>$_nl_</var></a></code>, 
				<code><a href="class-hQuery_Node.html#$_prop"><var>$_prop</var></a></code>, 
				<code><a href="class-hQuery_Node.html#$_tr_"><var>$_tr_</var></a></code>, 
				<code><a href="class-hQuery_Node.html#$doc"><var>$doc</var></a></code>, 
				<code><a href="class-hQuery_Node.html#$exc"><var>$exc</var></a></code>, 
				<code><a href="class-hQuery_Node.html#$ids"><var>$ids</var></a></code>, 
				<code><a href="class-hQuery_Node.html#$last_http_result"><var>$last_http_result</var></a></code>, 
				<code><a href="class-hQuery_Node.html#$selected_doc"><var>$selected_doc</var></a></code>, 
				<code><a href="class-hQuery_Node.html#$tag_map"><var>$tag_map</var></a></code>
			</p>
		</div>





</div>
	</div>

	<div id="footer">
		 API documentation generated by <a href="http://apigen.org">ApiGen</a>
	</div>
</div>
<script src="resources/combined.js"></script>
<script src="elementlist.js"></script>
</body>
</html>
